package com.aspose.cells;

class zayu extends zbz {
   zayu() {
      this.c(2151);
   }

   void a(Protection var1) {
      this.b(23);
      this.c = new byte[this.d()];
      this.c[0] = 103;
      this.c[1] = 8;
      this.c[12] = 2;
      this.c[14] = 1;
      this.c[15] = -1;
      this.c[16] = -1;
      this.c[17] = -1;
      this.c[18] = -1;
      if (var1.getAllowSelectingLockedCell()) {
         this.c[20] = (byte)(this.c[20] | 4);
      }

      if (var1.getAllowSelectingUnlockedCell()) {
         this.c[20] = (byte)(this.c[20] | 64);
      }

      if (var1.getAllowEditingObject()) {
         this.c[19] = (byte)(this.c[19] | 1);
      }

      if (var1.getAllowEditingScenario()) {
         this.c[19] = (byte)(this.c[19] | 2);
      }

      if (var1.getAllowFormattingCell()) {
         this.c[19] = (byte)(this.c[19] | 4);
      }

      if (var1.getAllowFormattingColumn()) {
         this.c[19] = (byte)(this.c[19] | 8);
      }

      if (var1.getAllowFormattingRow()) {
         this.c[19] = (byte)(this.c[19] | 16);
      }

      if (var1.getAllowInsertingColumn()) {
         this.c[19] = (byte)(this.c[19] | 32);
      }

      if (var1.getAllowInsertingHyperlink()) {
         this.c[19] = (byte)(this.c[19] | 128);
      }

      if (var1.getAllowInsertingRow()) {
         this.c[19] = (byte)(this.c[19] | 64);
      }

      if (var1.getAllowDeletingColumn()) {
         this.c[20] = (byte)(this.c[20] | 1);
      }

      if (var1.getAllowDeletingRow()) {
         this.c[20] = (byte)(this.c[20] | 2);
      }

      if (var1.getAllowSorting()) {
         this.c[20] = (byte)(this.c[20] | 8);
      }

      if (var1.getAllowFiltering()) {
         this.c[20] = (byte)(this.c[20] | 16);
      }

      if (var1.getAllowUsingPivotTable()) {
         this.c[20] = (byte)(this.c[20] | 32);
      }

   }
}
